so: tree.c framework.c
	gcc -Wall -fPIC -c tree.c framework.c
	gcc -shared -W1 -o libframework.so.1 tree.o framework.o

list-driver: listdriver.c list.c list.h
	gcc -ggdb -Wall -Wextra -c list.c listdriver.c
	gcc -o test list.o listdriver.o

graph-driver: graphdriver.c tree.c tree.h forest.c forest.h
	gcc -ggdb -Wall -Wextra -c list.c tree.c forest.c graph.c graphdriver.c
	gcc -o test list.o tree.o forest.o graph.o graphdriver.o

hashtable-driver: hashtabledriver.c hashtable.c
	gcc -ggdb -Wall -Wextra -c hashtable.c perfecthashtable.c hashtabledriver.c list.c
	gcc -o test hashtable.o perfecthashtable.o hashtabledriver.o list.o

tree-driver: treedriver.c tree.c tree.h
	gcc -ggdb -Wall -Wextra -c tree.c treedriver.c
	gcc -o test tree.o treedriver.o

clean:
	rm *.o
commit-ready:
	rm *.o
	rm *.out
	rm libframework.so.*
	rm test

help:
	echo 'Build Commands:'
	echo 'so -- Build the Linux shared library (.so file)'
	echo 'tree-driver -- Build the tree/forest driver'
	echo 'hashtable-driver -- Build the hash table driver'
